package fr.sinno.wms.batch.processor;

import org.springframework.batch.item.ItemProcessor;
import org.springframework.stereotype.Service;

import fr.sinno.wms.batch.model.BonLivraison;

@Service("bnLineProcessor")
public class BnLineProcessor implements ItemProcessor<BonLivraison, BonLivraison> {

//	@Autowired
//	@Qualifier(value="azer")
//	JobExecution jobExecution;
	

	public BonLivraison process(BonLivraison item) throws Exception {
//		ExecutionContext execContext = jobExecution.getExecutionContext();
//		System.out.println(" BnLineProcessor - " +item);
//		Map<String, BonLivraison> mapBL;
//		if(execContext.containsKey("blCollection"))
//		{
//			mapBL = (Map<String, BonLivraison>)execContext.get("blCollection");
//			mapBL.put(item.getRef(), item);
//		}else{
//			mapBL = new HashMap<String, BonLivraison>();
//			mapBL.put(item.getRef(), item);
//			execContext.put("blCollection", mapBL);
//		}
		System.out.println(" BnLineProcessor - " +item);
		return item;
	}

}
